﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MediaMonitor
{
    public partial class Logic : System.Web.UI.Page
    {
       static int  totalRow = 0;
        static int rowinserted = 0;
        [WebMethod]
        public static string SendMessage()
        {

            totalRow = 123223;

            for (int i = 0; i <= 1000; i++)
            {
                rowinserted = rowinserted + 1;
               // System.Threading.Thread.Sleep(100);
               
            }


            return "done";
        }
        [WebMethod]
        public static string Callrandamly(string message)
        {
            return Convert.ToString(rowinserted) + ";" + Convert.ToString(totalRow);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            cmdBind.OnClientClick = String.Format("javascript:$('#{0}').show();", lblUpdate.ClientID);
        }
        //variable 
       
         [WebMethod]
        public static string mainmethodfileUploadAndInsert(string message)
        {
           
            totalRow = 123223;
          
            for (int i = 0; i <= 100000; i++)
            {
                System.Threading.Thread.Sleep(1000);
                
            }


                return message;
        }

        protected void btnUpdate_Click(object sender, EventArgs e)
        {
            for (int i = 1; i <= 10; i++)
            {

                lblUpdate.Text += i.ToString();
                //System.Web.UI.ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "Script", "showMyDialog();", true);  
                
            }
        }
        
    }
    
}